home *** CD-ROM | disk | FTP | other *** search
- Path: news.cc.uic.edu!sunphy1!olczyk
- From: olczyk@sunphy1 (Constantin Rasinariu)
- Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
- Subject: Re: C++ with Zapp vs. Delphi
- Followup-To: comp.lang.c++,comp.lang.pascal.delphi.misc
- Date: 22 Jan 1996 02:26:39 GMT
- Organization: University of Illinois at Chicago
- Message-ID: <4duskv$2r54@tigger.cc.uic.edu>
- References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <DBk8wg2yqjbB083yn@iaccess.za> <4d7pmb$48c8@tigger.cc.uic.edu> <4dk38h$gdr@merlin.delphi.com> <4dksp1$3d6c@tigger.cc.uic.edu> <4dn30q$o7s@fountain.mindlink.net>
- NNTP-Posting-Host: sunphy1.phy.uic.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Brent Bysouth (brent_bysouth@mindlink.bc.ca) wrote:
- : a) messaging:
-
- : retcode := object.Dispatch(msgCompareTo);
-
- : - where msgCompareTo is a message type that you defined, and the
- : CompareTo method is declared as message method in the contained
- : classes. Note that this is how control components in Delphi handle
- : messages from Windows.
- If Dispatch works the way I believe it does then
- it is unreliable (although the method I'm thinking of may not be Dispatch
- in which case...).
- If Dispatch does not then it is poorly documented.
-
- : b) MethodAddress:
-
- : var
- : compareTo: TMethod;
- : begin
-
- : compareTo.Data := object;
- : compareTo.Code := object.MethodAddress('CompareTo');
- : if compareTo.Code <> nil then
- : retcode := TCompareTo(compareTo) ( {params} );
-
- : end;
-
- MethodAddress is extremely poorly documented.
-
- : -----------
-
- : It's not as elegant as other languages (Smalltalk comes to mind), but
- : it works. At some time I may be completing a package that makes all
- : of this more transparent, but there probably won't be a need as Delphi
- : 2.0 apparently supports dynamically typed types...
- If so then my arguement is moot (since it was against a statically typed
- SI language ). Unfortunately dynamic typing means that Object Pascal
- leads to typing strategies that are weaker then those in C++ ( another
- arguement for another time ). It is strange that the roles become reversed
- from their parent language. IMO, if Borland was going to use a Pascal
- derivative for Delphi, it should have been Eiffel.
- ------------------------
- Thaddeus L. Olczyk
- PS Due to an accident with a minivan, I won't be able to continue this thread.
- I have not forgotten that I owe you an example of MI and will provide
- when I am well (assuming this thread is is still going).
-
-
-